package com.tjsinfo.tjsoa.documentationflow.xingzhengfawen.bo;


import java.util.List;

import org.hibernate.criterion.DetachedCriteria;

import com.tjsinfo.tjsoa.Dao.IQbcDao;
import com.tjsinfo.tjsoa.documentationflow.xingzhengfawen.dao.ITXingzhengfawenYijianDAO;
import com.tjsinfo.tjsoa.documentationflow.xingzhengfawen.vo.TXingzhengfawenYijian;
//import com.tjsinfo.tjsoa.documentationflow.zuzhibufawen.vo.TZuzhibufaweiYijian;


public class TXingzhengfawenYijianBO implements ITXingzhengfawenYijianBO {
	private ITXingzhengfawenYijianDAO xingzhengfawenYijianDAO;
	private IQbcDao qbcDao;
	
	public IQbcDao getQbcDao() {
		return qbcDao;
	}

	public void setQbcDao(IQbcDao qbcDao) {
		this.qbcDao = qbcDao;
	}

	public ITXingzhengfawenYijianDAO getXingzhengfawenYijianDAO() {
		return xingzhengfawenYijianDAO;
	}

	public void setXingzhengfawenYijianDAO(
			ITXingzhengfawenYijianDAO xingzhengfawenYijianDAO) {
		this.xingzhengfawenYijianDAO = xingzhengfawenYijianDAO;
	}

	public String addXingzhengfawenyijian(TXingzhengfawenYijian xingzhengfawenYijian){
		return xingzhengfawenYijianDAO.save(xingzhengfawenYijian);
	}

	public List<TXingzhengfawenYijian> selectFuBenPage(DetachedCriteria criteria,
			Integer startIndex) {
		// TODO Auto-generated method stub
		
		return qbcDao.findPageByCriteria(criteria, 23, startIndex).getItems();
	}

	public Integer selectFuBenTotalLine(DetachedCriteria criteria) {
		// TODO Auto-generated method stub
		return qbcDao.getQueryNumber(criteria, "id");
	}
}
